<template>
    <div>
        这是组件1
        <button @click="add">点击数字增加</button>
        <button @click="add_list">点击向列表中加入数据</button>
    </div>
</template>

<script>
export default {
    name: "First",
    methods: {
        add() {
            this.$store.commit('num_add')
        },
        add_list() {
            this.$store.commit('add_list', 8)
        }
    }
}
</script>

<style scoped>

</style>
